<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>多选择下拉列表</title>
    <!-- 样式 -->
    <style>
        #leftName, #btn, #rightName {
            float: left;
            width: 100px;
            height: 300px;
        }
        #toRight, #toLeft {
            margin-top: 100px;
            margin-left: 30px;
            width: 50px;
        }
        .border {
            height: 500px;
            padding: 100px;
        }
    </style>
</head>
<body>
    <div class="border">
        <!-- 左边的选择框 -->
        <!-- multiple 可以设置多选的效果 -->
        <select name="" id="leftName" multiple="multiple">
            <option value="">苹果</option>
            <option value="">雪梨</option>
            <option value="">香蕉</option>
            <option value="">橙子</option>
        </select>
        <!-- 左右转移功能按钮 -->
        <div id="btn">
            <input type="button" id="toRight" value=">>">
            <input type="button" id="toLeft" value="<<">
        </div>
        <!-- 右边的选择框 -->
        <select name="" id="rightName" multiple="multiple">
            <option value="">木瓜</option>
            <option value="">菜心</option>
        </select>
    </div>    
</body>
<script src="jquery.min.js"></script>
<script>
    $(document).ready(function() {
        // 向右转移数据  appendTo
        $("#toRight").click(function(){
            $("#leftName option:selected").appendTo($("#rightName"));
        })
        // 向左转移数据  append
        $("#toLeft").click(function(){
            $("#leftName").append($("#rightName option:selected"));
        })
    })
</script>
</html>